package com.jasonli.dao;

import com.jasonli.domain.OrderInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Value;

import java.util.List;

public interface OrderInfoDao {

    //    添加订单
    @Insert("insert into order_info values(null,#{cid},#{pname},#{onumber},#{money},#{odate})")
    public boolean save(OrderInfo orderInfo);


    //    根据顾客cid查询
    @Select("select * from order_info where cid = #{cid}")
    public List<OrderInfo> getByPid(Integer cid);


    //    查询所有
    @Select("select * from order_info")
    public List<OrderInfo> getAll();

}
